package com.kt.client;

import com.kt.dataobject.ProductInfo;
import com.kt.dto.CartDTO;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;

import java.util.List;

//需要访问哪个服务
@FeignClient(name = "PRODUCT")
public interface ProductClient {
    @GetMapping("/msg")             //服务的请求路径
    String productMsg();
    @PostMapping("/product/listForOrder")
    List<ProductInfo> listForOrder(List<String> productIdList);
    @PostMapping("/product/decreaseStock")
     void decreaseStock(@RequestBody List<CartDTO>cartDTOList);
}
